package com.gxg.services;

import com.gxg.dao.StudentUserDao;
import com.gxg.entities.StudentUser;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AdminService
{
  @Autowired
  StudentUserDao studentUserDao;
  
  public List<StudentUser> getMemberListByTeachName(String teacherName)
  {
    List<StudentUser> studentUserList = this.studentUserDao.getStudentUserListByTeacherName(teacherName);
    
    return studentUserList;
  }
  
  public String deleteMember(String studentId)
  {
    if (this.studentUserDao.isStudentUser(studentId).booleanValue()) {
      return this.studentUserDao.deleteMemberByStudentId(studentId);
    }
    return "error:用户不存在";
  }
}
